#include <STC89C5xRC.H>
#include "delay.h"
#include "matrixiled.h"

unsigned char code animation[]={
	0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
	0xFF,0x08,0x08,0x08,0xFF,0x00,0x0E,0x15,
	0x15,0x15,0x0D,0x00,0x7F,0x01,0x03,0x00,
	0x7F,0x01,0x03,0x00,0x1E,0x21,0x21,0x21,
	0x1E,0x00,0x00,0x7D,0x00,0x00,0x00,0x00,
};//code 把内存放在flash里面（无法更改了），falsh内存更大，放的更多，把ram腾出来做别的
unsigned char i = 0;
unsigned char j = 0; 
unsigned char count = 0; 

void main()
{
	time0_init();
	matrixiled_init();
	while(1)
	{
		for(i = 0;i<8;i++)
		{
			matrixled_showcolum(i,animation[i+j]);
		}		
	}

}


void timer0_routine() interrupt 1
{
	static unsigned int t0count;
	TH0=64535/256;
	TL0=64535%256;
	t0count++;
	if(t0count>=75)
	{
		t0count = 0;
		j++;
		if(j>32)
		{
			j=0;
		}
	}
}
